package com.mzj.saas.mservice.community.repository;

import com.mzj.saas.mservice.community.entity.Community;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.List;

public interface CommunityRepository extends PagingAndSortingRepository<Community, String>, JpaSpecificationExecutor<Community>, JpaRepository<Community, String> {

    List<Community> findByCommunityIdInOrOrgId(List<Long> communityIds, Long orgId);

    List<Community> findByCityIdAndStatus(Long cityId, Integer status);

    List<Community> findByIdIn(List<String> ids);

    List<Community> findByOrgIdAndStatus(Long orgId, Integer status);

    List<Community> findByNameAndDistrictId(String name, Long districtId);

    List<Community> findByCityIdAndAddress(Long cityId, String address);


}
